Thursday, 14 March 2019

Adding and Searching Customer Records from Database | ASP.NET | Web Technology

Adding and Searching Customer Records from Database | ASP.NET | Web Technology 


Step 1: Creating a New Web Application

Step 2: Add Web Form for the empty website application

Website -----àAdd New Item -> WebForm
The default web form name is Default.aspx



Step 3: 

There will be 2 Webforms for this program

1. AddCustomer.aspx
2. Search.aspx

Design Page[AddCustomer.aspx]



Design Page[Search.aspx]


Step 4:  Adding the Database to the Program.
This also same procedure like how we added the web form
Website --à Add New Item -àSQL Server Database


For Creating Tables in the database first You have to select the Database Explorer
















You have Select Tables Folder then right-click and Select Add New table


Then Add Table Columns and its Data Types



After Specifying all the Columns and DataTypes Press Ctrl+S to save the table with its Name Here it is Customer.


After Successful Creation of Table in Database It will looks like this:


Step 5: We require Connection String to Obtain the connection between the Front-end Application with Back-end.


Click the Configure Data Source
Keep on clicking next then click Finish Button.
The Connection is created.

Step 6: Code for Add Customer Button in AddCustomer.aspx page



remember always add Namespaces at the top before typing program

Code for txtSearch Textbox in Search.aspx page

double click the txtSearch Textbox

remember always add Namespaces at the top before typing program
Step 7 : Executing the program using Ctrl+F5.
Output 1
Output 2

Output 3



Post a Comment

Whatsapp Button works on Mobile Device only

Start typing and press Enter to search